<html><body>
<?php
$username="eu_wilhelm";
$password="n3DN67xcDwPyba4S";
$database="eu_wilhelm";


mysql_connect("gis-db.uni-muenster.de",$username,$password) or die("Connection failed: ". mysql_error());

@mysql_select_db($database) or die( "Unable to select database: ". mysql_error());


$query="SELECT * FROM lbst";
$result=mysql_query($query);

$num=mysql_numrows($result);
echo "<table border='1'><tr>";
// printing table headers
echo "<td><b>ID</b></td>";
echo "<td><b>Session ID</b></td>";
echo "<td><b>Latitude</b></td>";
echo "<td><b>Longitude</b></td>";
echo "<td><b>Stadt</b></td>";
echo "<td><b>Straße</b></td>";
echo "<td><b>Pub</b></td>";
echo "<td><b>Cafe</b></td>";
echo "<td><b>Restaurant</b></td>";
echo "<td><b>Wetter</b></td>";
echo "<td><b>Bahnhof</b></td>";
echo "<td><b>Kapitel</b></td>";
echo "<td><b>Seite</b></td>";
echo "<td><b>Datum</b></td>";

echo "</tr>\n";
// printing table rows
while($row = mysql_fetch_row($result))
{
    echo "<tr>";

    // $row is array... foreach( .. ) puts every element
    // of $row to $cell variable
    foreach($row as $cell)
        echo "<td>$cell</td>";

    echo "</tr>\n";
}
mysql_free_result($result);
?>
</body></html>

